package es.cea.listener;

import java.util.ArrayList;

import javax.servlet.ServletContext;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * Application Lifecycle Listener implementation class IniciaListaSession
 *
 */
@WebListener
public class IniciaListaSession implements HttpSessionListener {

    /**
     * Default constructor. 
     */
    public IniciaListaSession() {
       
    }

	/**
     * @see HttpSessionListener#sessionCreated(HttpSessionEvent)
     */
    public void sessionCreated(HttpSessionEvent arg0) {
      
    
		ArrayList<Integer> listaEstadisticas = new ArrayList<Integer>();
		
		listaEstadisticas.add(new Integer(1));
		arg0.getSession().setAttribute("estadisticas", listaEstadisticas);
	

    }

	/**
     * @see HttpSessionListener#sessionDestroyed(HttpSessionEvent)
     */
    public void sessionDestroyed(HttpSessionEvent arg0) {
        // TODO Auto-generated method stub
    }
	
}
